Multiprotocol Label Switching (MPLS) is a technology for backbone networks. FIG. 1 is a diagram illustrating an example of a prior art MPLS network with edge routers and switch routers R0 to R6. Label Edge Routers (LERs) 100, 125 sit at edges of the MPLS network. The LER 100 is capable of encapsulating an MPLS label 103 to the datagram 102. In addition to the LERs 100 and 125, there may be multiple Label Switch Routers (LSRs) 105–120 responsible for forwarding the datagram 102. The LSR 105 also encapsulates the datagram 102 with another label 104. The LSRs 105–120 communicate with each other using a Label Distribution Protocol (LDP). The LER 100 is referred to as ingress LER, and the LER 125 is referred to as egress LER.
The datagram 102 travels from the LSR 105 to the LSR 120 through the MPLS network using a Label Switched Path (LSP) 135. The LSR 105 forwards the datagram 102 to its adjacent LSR 110. The LSR 110 then forwards the datagram 102 to its adjacent LSR 115, and so on. MPLS uses a hierarchy of labels known as label stack. For layer 2 transport over MPLS applications, the label stack includes a virtual circuit (VC) label and one or more tunnel labels above the VC label.
Referring to FIG. 1, the LER 100 pushes the first label 103 onto the label stack. This is the VC label. The VC label is determined based on information associated with the datagram 102. Thus, the VC label identifies a virtual circuit in the egress LER 125 that the ingress LER 100 wants the datagram 102 is to be forwarded to. Each VC label is associated with a VC.
The LSR 105 pushes the second label 104 on the label stack. This is the tunnel label. The tunnel label identifies the adjacent LSR 110 that the datagram 102 is to be forwarded to. This continues until the datagram 102 is forwarded to the LSR 120. The LSR 120 removes the current tunnel label from the top of the label stack but does not replace that tunnel label with another tunnel label because the operation associated with the tunnel label is a pop operation. Through the tunnel label, the LSR 120 also recognizes its adjacent router, which is the LER 125. When the LER 100 is adjacent to the LER 125, the VC label 103 is the only label pushed onto the label stack. Thus, the VC label is normally on the label stack, and the tunnel label, if present, is immediately above the VC label.
When a failure prevents the datagram 102 from being forwarded to the egress LER 125 along the LSP 135, the tunnel labels in the label stack may need to be modified. It is essential that this process be carried out quickly to minimize delay.